
const { ccclass, property, requireComponent } = cc._decorator;

@ccclass
@requireComponent(cc.Sprite)
export default class WaterDropCompV2 extends cc.Component {

    private mat: cc.Material = null;



    start() {
        this.mat = this.node.getComponent(cc.Sprite).getMaterial(0);
    }


    setTexture(index:number,tex:cc.Texture2D){
        this.mat.setProperty('texture2',tex,index);
    }

    setCurIndex(index: number) {
        this.mat.setProperty('curTexIndex', index)
    }

    // update (dt) {}
}
